//
//  BlockView.m
//  MRC_Playground
//
//  Created by Developer on 2021/9/30.
//

#import "BlockView.h"

@implementation BlockView

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(jk_tapAction)];
        [self addGestureRecognizer:tap];
        
        [tap release]; tap = nil;
    }
    return self;
}

- (void)dealloc{
    if (_dismissCallback) {
        [_dismissCallback release];
    }
    [super dealloc];
}

- (void)jk_tapAction{
    if (self.dismissCallback) {
        self.dismissCallback();
    }
    self.backgroundColor = [UIColor blueColor];
}

@end
